bitkeeper revision 1.157 (3e7e2a8f82w4Wez8Nigyi3seahCBIA)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sun, 23 Mar 2003 21:43:43 +0000 (21:43 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Sun, 23 Mar 2003 21:43:43 +0000 (21:43 +0000)
config.h, domain.c, dom_mem_ops.c:
  Fixed out-of-memory handling slightly.

xen/common/dom_mem_ops.c
xen/common/domain.c
xen/include/xeno/config.h

index 07f7cf8f7d65d14674afb45da984b950e39e8b49..52c4d30f905e6759143240413d1b2cdcfa899a20 100644 (file)
@@ -40,7 +40,7 @@ static long alloc_dom_mem(struct task_struct *p, balloon_def_op_t bop)
 
     spin_lock_irqsave(&free_list_lock, flags);
 
-    if ( free_pfns < (bop.size + (SLACK_DOMAIN_MEM_KILOBYTES << 
+    if ( free_pfns < (bop.size + (SLACK_DOMAIN_MEM_KILOBYTES >> 
                                   (PAGE_SHIFT-10))) ) 
     {
         spin_unlock_irqrestore(&free_list_lock, flags);
index d8ea1078a6274c7c9ed7af449e528aedca9d7eb2..99a29d2771e7f1f131e66c9dfe3c35b81ca76f59 100644 (file)
@@ -161,7 +161,7 @@ unsigned int alloc_new_dom_mem(struct task_struct *p, unsigned int kbytes)
     spin_lock_irqsave(&free_list_lock, flags);
     
     /* is there enough mem to serve the request? */   
-    if ( (req_pages + (SLACK_DOMAIN_MEM_KILOBYTES << (PAGE_SHIFT-10))) >
+    if ( (req_pages + (SLACK_DOMAIN_MEM_KILOBYTES >> (PAGE_SHIFT-10))) >
          free_pfns )
     {
         spin_unlock_irqrestore(&free_list_lock, flags);
index 0623d607db2895b955f6c6f2b58876f2daefc60d..ed08041b7d43c277e5514fdcf152ec62365263f6 100644 (file)
@@ -89,7 +89,7 @@
  * Amount of slack domain memory to leave in system, in megabytes.
  * Prevents a hard out-of-memory crunch for thinsg like network receive.
  */
-#define SLACK_DOMAIN_MEM_KILOBYTES 1024
+#define SLACK_DOMAIN_MEM_KILOBYTES 2048
 
 /* Linkage for x86 */
 #define FASTCALL(x)     x __attribute__((regparm(3)))